package com.wms.dao;

import com.wms.domain.GoodsDomain;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper;

import java.util.List;

@Mapper
public interface GoodsMapper {

    public void addGoods(GoodsDomain goodsDomain);

    public void updateGoods(GoodsDomain goodsDomain);

    @Delete("UPDATE goods SET goods_stat = 0 WHERE id = ${id}")
    void deleteGoods(@Param("id") Long id);

    public List<GoodsDomain> getGoodsPage(GoodsDomain goodsDomain);
}
